<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <title>099-黑白滤镜</title>
    <style>
      .bgimg_filter {
        -webkit-filter: grayscale(100%);
        -moz-filter: grayscale(100%);
        -ms-filter: grayscale(100%);
        -o-filter: grayscale(100%);
        filter: grayscale(100%);
        filter: gray;
      }

      .bgimg_filter:hover {
        filter: none;
        -webkit-filter: grayscale(0%);
      }

      .imgbox {
        width: 200px;
        height: 200px;
      }

      .imgbox img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    </style>
  </head>

  <body>
    <div class="imgbox bgimg_filter">
      <img src="/assets/img/bg.jpg" />
    </div>
  </body>
</html>
